#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    double t;
    scanf("%lf", &t);
    int hh = t / 3600;
    int mm = (t - hh * 3600) / 60;
    int ss = (int)(t - hh * 3600 - mm * 60);
    int ff = (int)(t * 100) % 100;
    printf("%02d:%02d:%02d.%02d\n", hh, mm, ss, ff);
    return 0;
}